import request from "@/utils/request";

export const getWords = (status) => {
  return request.get("/list", {
    params: { status },
  });
};
export const updateWordsApi = (id, status) => {
  console.log(id, status);
  return request.put(`/words`, {
    id,
    status,
  });
};
export const getNumApi = () => {
  return request.get(`/words/num`);
};

// 获取单词详情
export const getWordDetail = (id) => {
  return request.get(`/words/${id}`);
};

// 更新单词详情（笔记等）
export const updateWordDetail = (id, data) => {
  return request.put(`/words/detail`, data);
};
